<div class="tab-pane" id="lease">
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <h1 class="page-header">物品租借记录</h1>
        <h6><button class="btn btn-success btn-xs khdisabled" data-toggle="modal" data-target="#addlease">
        <span class="glyphicon glyphicon-plus-sign"></span> 添加租借信息</button></h6>
   <div class="modal fade" id="addlease" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
     <div class="modal-content">
      <div class="modal-header">
       <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
       <h4 class="modal-title" id="myModalLabel"><span class="glyphicon glyphicon-plus-sign"></span> 添加租借信息</h4>
      </div>
      <div class="modal-body">
       <form class="form-horizontal" role="form" method="post" id="add_lease">
        <div class="form-group">
         <label for="inputEmail3" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
         <span style="float: left;margin: 10px 0 0 -100px;" class="lease_name_error"></span>
          <div class="input-group lease_name">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-barcode"></span>
           </div>
           <input type="text" placeholder="物品名字" class="form-control" id="lease_name" />
          </div>
         </div>
        </div>
        <div class="form-group">
         <label for="form-horizontal" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
         <span style="float: left;margin: 10px 0 0 -100px;" class="lease_num_error"></span>
          <div class="input-group lease_num">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-asterisk"></span>
           </div>
           <input type="text" placeholder="物品数量" class="form-control" id="lease_num" />
          </div>
         </div>
        </div>
        <div class="form-group">
         <label for="form-horizontal" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
         <span style="float: left;margin: 10px 0 0 -100px;" class="lease_out_time_error"></span>
          <div class="input-group lease_out_time">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-time"></span>
           </div>
           <input type="text" placeholder="借出时间" class="form-control" id="lease_out_time"  disabled="disabled" value="<?php echo date('Y-m-d H:i',time()); ?>" />
          </div>
         </div>
        </div>
        <div class="form-group">
         <label for="form-horizontal" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
         <span style="float: left;margin: 10px 0 0 -100px;" class="lease_out_name_ins_error"></span>
          <div class="input-group lease_out_name_ins">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-user"></span>
           </div>
           <input type="text" placeholder="借走人" class="form-control" id="lease_out_name_ins" />
          </div>
         </div>
        </div>
        <div class="form-group">
         <label for="form-horizontal" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
          <span style="float: left;margin: 10px 0 0 -100px;" class="lease_addr_error"></span>
          <div class="input-group lease_addr">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-home"></span>
           </div>
           <select class="form-control" id="lease_addr">
            <option>超小店</option>
            <option>白露分店</option>
            <option>六楼仓库</option>
            <option>总店</option>
          </select>
          </div>
         </div>
        </div>
        <div class="form-group">
         <label for="form-horizontal" class="col-sm-2 control-label"></label>
         <div class="col-sm-10">
         <span style="float: left;margin: 10px 0 0 -100px;" class="lease_out_name_error"></span>
          <div class="input-group lease_out_name">
           <div class="input-group-addon">
            <span class="glyphicon glyphicon-user"></span>
           </div>
           <input type="text" placeholder="借出人" class="form-control" id="lease_out_name" disabled="disabled" value="<?php echo $_SESSION['username']; ?>"/>
          </div>
         </div>
        </div>
       </form>
      </div>
      <div class="modal-footer">
       <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> 关闭</button>
       <button type="button" class="btn btn-primary" onclick="lease_add();"><span class="glyphicon glyphicon-ok"></span> 保存</button>
      </div>
     </div>
    </div>
   </div>

            <div class="row placeholders">
            当前租借物品： 未归还  <span id="lease-no"><?php num('lease','start','0'); ?> </span> 个,已归还 <span id="lease-ok"><?php num('lease','start','1'); ?> </span> 个
            </div>
        <h2 class="sub-header">租借列表</h2>
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                        <tr class="alert alert-info">
                            <td>物品名字</td>
                            <td>数量</td>
                            <td>借出时间</td>
                            <td>借走人</td>
                            <td>地址</td>
                            <td>借出人</td>
                            <td style="float: left;">操作</td>
                        </tr>
                    </thead>
                    <tbody id="lease-info">
                        <?php lease_query(); ?>
                    </tbody>
                </table>
            </div>
    </div>
</div>
